home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / bike / macros / velo2.sci < prev    next >
Text File  |  1999-09-16  |  913b  |  29 lines

  1. function []=velo2()
  2. // empty wheel : the shortest
  3. // (geometric calculations made by param3d)
  4. t= t*180/%pi;
  5. p= p*180/%pi;
  6. xe=[xmin,xmax,xmax,xmin,xmin]
  7. ye=[ymin,ymin,ymax,ymax,ymin]
  8. //plotting frame
  9. param3d(xe,ye,zmin*ones(1,5),t,p," ",[1,0],rect);
  10. //param3d(xprear(1,:),xprear(2,:),xprear(3,:),  t,p," ",[0,0])
  11. //param3d(xpfront(1,:),xpfront(2,:),xpfront(3,:), t,p," ",[0,0])
  12. xset("alufunction",6)
  13. /////////////////////////////////////
  14. [n1,n2]=size(xfrontar);
  15. deff('[]=velod(i)',['param3d(xf(:,i),yf(:,i),zf(:,i),t,p,'' '',[0,0]);';
  16.     'param3d(xfrontar(:,i),yfrontar(:,i),zfrontar(:,i),t,p,'' '',[0,0]);';
  17.     'param3d(xrearar(:,i),yrearar(:,i),zrearar(:,i),t,p,'' '',[0,0]);';])
  18. comp(velod);
  19. for i=1:1:n2-1,velod(i);velod(i);
  20. ww=i:i+1;
  21. param3d(xprear(1,ww),xprear(2,ww),xprear(3,ww),  t,p," ",[0,0])
  22. param3d(xpfront(1,ww),xpfront(2,ww),xpfront(3,ww), t,p," ",[0,0])
  23. end
  24. velod(n2-1);
  25. xset("alufunction",3);
  26.  
  27.  
  28.  
  29.